package com.zhoux.ty.controller;

import com.zhoux.ty.domain.JsonResult;
import com.zhoux.ty.domain.SysNotice;
import com.zhoux.ty.feign.RemoteNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author taoyi
 * @version 1.0
 * @date 2021/7/25 18:31
 */
@RestController
public class PortalsController {
    @Autowired
    private RemoteNoticeService remoteNoticeService;

    @GetMapping("/portals/notice/")
    public JsonResult doSelectNotice(SysNotice notice){
        //如何调用notice服务呢?
        return remoteNoticeService.doSelectNotices(notice);
    }

    @GetMapping("/portals/notice/doSelectById/")
    public JsonResult doSelectById(Long id){
        return remoteNoticeService.doSelectById(id);
    }
}
